<?xml version="1.0" encoding="utf-8"?>
<Content type="xform" name="EditContent">
	<model>
		<instance>
			<Query name="MailFormDownload" storedProcedure="spMailFormDownload" output="csv" logActivity="true" logActivityDetail="" filePrefix="">
				<param name="lastDownload" type="number" value="0"/>
				<param name="formType" type="string"  value=""/>
			</Query>
		</instance>
		<submission id="MailFormSubmissions" action="/ewcommon/tools/export.ashx?ewcmd=Reports&amp;ewCmd2=Mail-Form-Downloads&amp;reportXsl=Mail-Form-Downloads&amp;format=csv" method="post" event="return"/>
		<bind nodeset="Query">
			<bind id="formType" nodeset="param[@name='formType']/@value" required="false()" type="string"/>
			<bind id="formType" nodeset="@logActivityDetail" required="false()" type="string"/>
			<bind id="formType" nodeset="@filePrefix" required="false()" type="string"/>
			<bind id="lastDownloadId" nodeset="param[@name='lastDownload']/@value" required="false()" type="string"/>
		</bind>
	</model>
	<group ref="MailForm" class="inline">
		<label>Mail Form Download</label>
		<select1 bind="formType" class="ewQuery" query="execute spMailTypeOptions">
			<label>Form Type</label>
		</select1>
		<select1 bind="lastDownloadId" class="ewQuery" query="execute spMailDownloadOptions">
			<label>Submissions Since Last Download on</label>
            <item>
                <label>All</label>
                <value>0</value>
            </item>
		</select1>
	</group>
	<group ref="EditContent" class="inline">
		<submit submission="" ref="ewSubmitGetReport" class="principle">
			<label>Get Report</label>
		</submit>
	</group>
</Content>
